home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swaga_c.zip / CRT.SWG / 0017_Set High Background.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-26  |  1KB  |  51 lines

  1. >Actually James you are in correct.  Here is some code that will change the
  2. >blinking characters to a enhanced back ground...
  3. >Procedure HighBackGround;
  4. >VAR
  5. >  R: Registers;  {You must use the Dos Unit.}
  6. >BEGIN
  7. >  WITH R DO
  8. >  BEGIN
  9. >    R.AH:=$10;
  10. >    R.AL:=$03;
  11. >    BL:=0;
  12. >     {0 for intense back ground}
  13. >     {1 for blink}
  14. >  END;
  15. >  Intr($10,R);
  16. >END;
  17. >Hope this helps,
  18. >  
  19.  
  20.   This solution is correct, but only for EGA or higher monitors.  
  21.  
  22.   To get high intensity background colors on a CGA card, you need to
  23.   access the Color Graphics Mode Control Register, port $3d8.
  24.  
  25.   The bit meanings are as follows:
  26.  
  27.   bit
  28.  
  29.   7,6   unused
  30.   5     blink mode 0 = disable blink 1 = enable blink
  31.   4     graphics resolution 0 = 320x200 1 = 640x200
  32.   3     video enable 0 = disable 1 = enable
  33.   2     color mode 0 = color 1 = bw
  34.   1     monitor mode 0 = alphanumeric 1 = graphics
  35.   0     char. size 0 = 40x25 1 = 80x25
  36.  
  37.   The simplist answer to your problem is, in TP, 
  38.  
  39.     port[$3d8] := $9
  40.  
  41.   This sets 80x25 color alphanumeric mode with high intensity
  42.   background colors.  If you need other modes, set the bits
  43.   accordingly.  
  44.  
  45.   One word of caution:  register $3d8 is write only, so you can't
  46.   use the read-or-write method of bit setting.  You'll need to look
  47.   into the BIOS data area to find out the current video mode if
  48.   necessary.
  49.